<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="Bookmark" href="/favicon.ico" >
        <link rel="Shortcut Icon" href="/favicon.ico" />
        <!--[if lt IE 9]>
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/html5shiv.js"></script>
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/respond.min.js"></script>
        <![endif]-->
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/static/h-ui/css/H-ui.min.css" />
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/static/h-ui.admin/css/H-ui.admin.css" />
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/lib/Hui-iconfont/1.0.8/iconfont.css" />
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/static/h-ui.admin/skin/default/skin.css" id="skin" />
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/static/h-ui.admin/css/style.css" />
        <!--[if IE 6]>
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
        <script>DD_belatedPNG.fix('*');</script>
        <![endif]-->
        <title>首页</title>
    </head>
    <body>
        <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
            <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
        </nav>
        <div class="page-container">
            <div class="row">
                <div class="col-sm-3">
                    <div class="panel panel-primary radius">
                        <div class="panel-header">账户余额</div>
                        <div class="panel-body">
                            <h1 class="bg-1 radius"><?php echo number_format($amount,2) ?></h1>
                            <div class="f-r {if $annualIncrease>0}c-success{elseif $annualIncrease==0}c-warning{else}c-danger{/if}"></div>
                            <small>元</small>
                        </div>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="panel panel-primary radius">
                        <div class="panel-header">成交金额 | 今日</div>
                        <div class="panel-body">
                            <h1 class="bg-1 radius"><?php echo number_format($tdyPayAmount,2) ?></h1>
                            <!--<div title="日增长率" class="f-r {if $dailyIncrease>0}c-success{elseif $dailyIncrease==0}c-warning{else}c-danger{/if}"><b>{$dailyIncrease} </b><i class="Hui-iconfont">{if $dailyIncrease>0}&#xe679;{elseif $dailyIncrease==0}&#xe6a1;{else}&#xe674;{/if}</i></div>-->
                            <small>下单金额： <?php echo number_format($todayMoney,2) ?> 元</small>
                        </div>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="panel panel-primary radius">
                        <div class="panel-header">成交订单量 | 今日</div>
                        <div class="panel-body">
                            <h1 class="bg-1 radius"><?php echo number_format($tdyNum) ?></h1>
                            <!--<div title="日增长率" class="f-r {if $annualIncrease>0}c-success{elseif $annualIncrease==0}c-warning{else}c-danger{/if}"><b>{$annualIncrease} </b><i class="Hui-iconfont">{if $annualIncrease>0}&#xe679;{elseif $annualIncrease==0}&#xe6a1;{else}&#xe674;{/if}</i></div>-->
                            <small>下单量： <?php echo number_format($todayNum) ?></small>
                        </div>
                    </div>
                </div>
            </div>
            <div id="container" class="col-sm-10 mt-30" style="min-width:700px;height:400px;"></div>
        </div>
        <!--_footer 作为公共模版分离出去-->
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/jquery/1.9.1/jquery.min.js"></script> 
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/layer/2.4/layer.js"></script>
        <script type="text/javascript" src="__STATIC__/admin/hui/static/h-ui/js/H-ui.min.js"></script> 
        <script type="text/javascript" src="__STATIC__/admin/hui/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

        <!--请在下方写此页面业务相关的脚本-->
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/hcharts/Highcharts/5.0.6/js/highcharts.js"></script>
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/hcharts/Highcharts/5.0.6/js/modules/exporting.js"></script>
        <script type="text/javascript">
            $.getJSON("{:url('index/welcome')}", function (csv) {
                chart = Highcharts.chart('container', {
                    data:{
                        date: new Date()
                    },
                    title: {
                        text: csv.year+'年销售情况统计表',
                        x: -20 //center
                    },
                    subtitle: {
                        text: csv.company,
                        x: -20
                    },
                    xAxis: {
                        categories: csv.categories
                    },
                    yAxis: [{ // 第一个 Y 轴，放置在左边（默认在坐标）
                        title: {
                            text: '订单数'
                        },
                        labels: {
                            align: 'left',
                            x: 3,
                            y: 16,
                            format: '{value:.,0f}',
                            step:1
                        },
                        showFirstLabel: false
                    }, {    // 第二个坐标轴，放置在右边
//                        linkedTo: 0,
                        gridLineWidth: 0,
                        opposite: true,  // 通过此参数设置坐标轴显示在对立面
                        title: {
                            text: '金额（元）'
                        },
                        labels: {
                            align: 'right',
                            x: -3,
                            y: 16,
                            format: '{value:.,0f}'
                        },
                        showFirstLabel: false
                    }],
                    plotOptions: {
                        line: {
                            dataLabels: {
                                // 开启数据标签
                                enabled: true
                            },
                            // 关闭鼠标跟踪，对应的提示框、点击事件会失效
                            enableMouseTracking: true
                        }
                    },
                    legend: {
                        layout: 'vertical',
                        align: 'right',
                        verticalAlign: 'middle',
                        borderWidth: 0
                    },
                    series: [{
                            name: '订单数',
                            data: csv.num,
                            yAxis:0,
                            dashStyle: 'longdash'
                        }, {
                            name: '金额（元）',
                            data: csv.money,
                            yAxis:1,
                            tooltip: {
                                valueDecimals: 2
                            }
                        }],
                    credits:{
                        enabled: false // 禁用版权信息
                    }
                });
            });
        </script>
    </body>
</html>